package input;

import java.awt.event.KeyEvent;

public class Keyboard {
	
	//space = 0;
	// escape = 1;
	// shift = 2;
	// left = 3;
	// right = 4;
	// up = 5;
	// down = 6;
	
	public boolean[] keys;
	
	public Keyboard() {
		keys = new boolean[7];
		for(int i = 0; i < 7; i++) {
			keys[i] = false;
		}
	}
	
	public void Update(KeyEvent key, boolean setUnset) {
		switch(key.getKeyCode()) {
		case KeyEvent.VK_SPACE:
			keys[0] = setUnset;
			break;
		case KeyEvent.VK_ESCAPE:
			keys[1] = setUnset;
			break;
		case KeyEvent.VK_SHIFT:
			keys[2] = setUnset;
			break;
		case KeyEvent.VK_LEFT:
			keys[3] = setUnset;
			break;
		case KeyEvent.VK_RIGHT:
			keys[4] = setUnset;
			break;
		case KeyEvent.VK_UP:
			keys[5] = setUnset;
			break;
		case KeyEvent.VK_DOWN:
			keys[6] = setUnset;
			break;
		default:
			break;
		}
	}
	
	
}
